/**
 * @File	FacadeBase.java
 * @Package	cn.com.ums.plat.pool
 * 
 * @Version	@Date		@Author	@Brief
 * 0.0.1	2017-05-17	Conan	新建	
 */
package com.plat.pool;

import org.apache.log4j.Logger;

/**
 * @Class	FacadeBase
 * @Brief	北京银联商务应用处理
 */
public abstract class PassFacadeBase extends FacadeBase {
	private static Logger log = Logger.getLogger(LogicFacadeBase.class);							//log4j日志

	protected byte[] outRspMsg = null;
	public abstract boolean send();
	
	@Override
	public boolean packInMsg() {
		inRspMsg = outRspMsg;
		
		return true;
	}
	
	public void setLogic(String[] logics) {
		log.info("获取应用处理逻辑步骤...");
		arrLogic.add("init");
		arrLogic.add("unpackInMsg");
		arrLogic.add("start");
		arrLogic.add("isRish");
		for(String logic : logics) {
			switch(logic) {
			case "init":
			case "unpackInMsg":
			case "start":
			case "isRish":
			case "send":
			case "packInMsg":
			case "finish":
			case "end":
				break;
			default:
				arrLogic.add(logic);
				break;				
			}
		}
		arrLogic.add("send");
		arrLogic.add("packInMsg");
		arrLogic.add("finish");
		arrLogic.add("end");
		
		log.info("  共获取[" + arrLogic.size() + "]个逻辑处理步骤");
	}
}
